package com.Eastiy.EXO.View;

import android.content.Context;
import android.view.View;
import android.widget.PopupWindow;
import android.widget.ScrollView;

public class NewWindow extends PopupWindow {
    /* access modifiers changed from: private */
    public static NewCDV NewWindowcdv;
    private static Context context;
    private NewView nwll;
    private NewView nwll10;
    private NewView nwll11;
    private NewView nwll2;
    private NewView nwll3;
    private NewText nwll4;
    private NewView nwll5;
    private ScrollView nwll6;
    private NewView nwll7;
    private NewView nwll8;
    private NewText nwll9;

    public NewWindow(Context context2, View view, Object obj, boolean z) {
        context = context2;
        if (NewWindowcdv != null) {
            NewWindowcdv.dismiss();
            NewWindowcdv = null;
        }
        this.nwll = new NewView(context2, new Integer((int) (((double) m36H()) * 0.7d)), new Integer((int) (((double) m36H()) * 0.7d)), "CT", new Integer(1), 1, "#000000", new Integer(20), (View.OnClickListener) null);
        Context context3 = context2;
        this.nwll2 = new NewView(context3, new Integer((int) (((double) m37W()) * 0.65d)), new Integer((int) (((double) m36H()) * 0.1d)), "CC", new Integer(1), 1, "#000000", new int[]{20, 20, 0, 0}, (View.OnClickListener) null);
        this.nwll3 = new NewView(context2, new Integer((int) (((double) m37W()) * 0.63d)), new Integer((int) (((double) m36H()) * 0.1d)), "CC", new Integer(0), 2, (Object) null, (Object) null, (View.OnClickListener) null);
        this.nwll11 = new NewView(context2, new Integer((int) (((double) m37W()) * 0.08d)), new Integer((int) (((double) m36H()) * 0.1d)), "CC", new Integer(0), 2, (Object) null, (Object) null, (View.OnClickListener) null);
        this.nwll4 = new NewText(context2, obj, "CC", 19, "#E4FFE9");
        this.nwll10 = new NewView(context2, new Integer((int) ((((double) m37W()) * 0.63d) - (((double) m36H()) * 0.28d))), new Integer((int) (((double) m36H()) * 0.1d)), "LC", new Integer(0), 2, (Object) null, (Object) null, (View.OnClickListener) null);
        this.nwll8 = new NewView(context2, new Integer((int) (((double) m36H()) * 0.08d)), new Integer((int) (((double) m36H()) * 0.08d)), "CC", new Integer(1), 1, "#000000", new Integer(10), (View.OnClickListener) null);
        this.nwll9 = new NewText(context2, "✕", "CC", 18, "#E4FFE9");
        this.nwll8.setOnClickListener(new View.OnClickListener(this) {
            private final NewWindow this$0;

            {
                this.this$0 = r1;
            }

            static NewWindow access$0(AnonymousClass100000000 r1) {
                return r1.this$0;
            }

            @Override
            public void onClick(View view) {
                NewWindow.NewWindowcdv.dismiss();
            }
        });
        this.nwll5 = new NewView(context2, new Integer((int) (((double) m37W()) * 0.63d)), new Integer((int) (((double) m36H()) * 0.71d)), "CT", new Integer(1), 2, (Object) null, (Object) null, (View.OnClickListener) null);
        this.nwll6 = new ScrollView(context2);
        this.nwll7 = new NewView(context2, new Integer(-2), new Integer(-2), "CT", new Integer(1), 2, (Object) null, (Object) null, (View.OnClickListener) null);
        this.nwll.addView(this.nwll2);
        this.nwll2.addView(this.nwll3);
        this.nwll3.addView(this.nwll11);
        this.nwll11.addView(this.nwll4);
        this.nwll3.addView(this.nwll10);
        this.nwll3.addView(this.nwll8);
        this.nwll8.addView(this.nwll9);
        this.nwll.addView(this.nwll5);
        this.nwll5.addView(this.nwll6);
        this.nwll6.addView(this.nwll7);
        this.nwll7.addView(view);
        if (z) {
            NewWindowcdv = new NewCDV(this.nwll, new Integer((int) (((double) m37W()) * 0.65d)), new Integer((int) (((double) m36H()) * 0.8d)), false, true, false, "RC", "In", (int) (((double) m37W()) * 0.05d), 0);
        } else {
            NewWindowcdv = new NewCDV(this.nwll, new Integer((int) (((double) m37W()) * 0.65d)), new Integer((int) (((double) m36H()) * 0.8d)), false, true, false, "LC", "In", (int) (((double) m37W()) * 0.05d), 0);
        }
    }

    /* renamed from: H */
    public static int m36H() {
        return context.getResources().getDisplayMetrics().heightPixels;
    }

    /* renamed from: W */
    public static int m37W() {
        return context.getResources().getDisplayMetrics().widthPixels;
    }

    public static void dis() {
        NewWindowcdv.dismiss();
    }
}
